package util;

import com.jme.image.Texture;
import com.jme.scene.Spatial.TextureCombineMode;
import com.jme.scene.state.TextureState;
import com.jme.system.DisplaySystem;
import com.jme.util.TextureManager;

public class util {

	public static TextureState createTextureState(String texture){
		TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
		Texture t = TextureManager.loadTexture(util.class.getClassLoader()
								.getResource(texture),
					Texture.MinificationFilter.BilinearNearestMipMap,
					Texture.MagnificationFilter.Bilinear);
		ts.setTexture(t);
		return ts;
	}
}
